package day0325;

public class Test2 {
    public static void main(String[] args) {
        //文件名.方法名(数据);
        Test2.brick(36,36);
    }

    public static void brick(int bCount, int  personCount){
        for (int m = 0; m <= Math.min(bCount/4, personCount); m++) {
            for (int w = 0; w <= Math.min(bCount/3,  personCount)  ; w++) {
                int k = personCount - m - w;
                if (k>=0  &&  (m * 4   +   w * 3   +   k * 0.5 == bCount)) {
                    System.out.println("男的数量：" + m + ",女的数量：" + w + ",小孩数量:" + k);
                }
            }
        }
    }




}
